package com.pig.pojo.goods;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.pig.pojo.BasePojo;

import java.io.Serializable;
import java.util.Date;

/**
 * 评论实体类
 */
@TableName("p_goods_comment")
public class Comment implements Serializable{

    /**
     * 评论ID
     */
    @TableId(type = IdType.AUTO)
    private Integer id;
    /**
     * 评论用户名
     */
    private String username;
    /**
     * 评论内容
     */
    private String comm;
    /**
     * 属于哪个商品的评论
     */
    private Integer goodsId;

    /**
     * 创建时间
     */
    private Date createdTime;

    public Comment() {
    }

    public Comment(Integer id, String username, String comm, Integer goodsId,Date createdTime) {
        this.id = id;
        this.username = username;
        this.comm = comm;
        this.goodsId = goodsId;
        this.createdTime = createdTime;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getComm() {
        return comm;
    }

    public void setComm(String comm) {
        this.comm = comm;
    }

    public Integer getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(Integer goodsId) {
        this.goodsId = goodsId;
    }

    public Date getCreatedTime() {
        return createdTime;
    }

    public void setCreatedTime(Date createdTime) {
        this.createdTime = createdTime;
    }

    @Override
    public String toString() {
        return "Comment{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", comm='" + comm + '\'' +
                ", goodsId=" + goodsId +
                ", createdTime=" + createdTime +
                '}';
    }
}
